import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import mother from '../views/mother.vue'
import classs from '../views/classs.vue'
import me from '../views/me.vue'
import moment from '../views/moment.vue'
import goods from '../views/goodsDetail.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/mother',
    name: 'mother',
    component: mother,
    children: [
      // {
      //   path: '/mother/goods',
      //   name: 'goods',
      //   component: goods
      // }
    ]
  },
  {
    path: '/classs',
    name: 'classs',
    component: classs
  },
  {
    path: '/me',
    name: 'me',
    component: me
  },
  {
    path: '/moment',
    name: 'moment',
    component: moment
  },
  {
    path: '/mother/goods',
    name: 'goods',
    component: goods
  }

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
